using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class HL7_ActionMap : EntityTypeConfiguration<HL7_Action>
    {
        public HL7_ActionMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.RecordID)
                .HasMaxLength(50);

            this.Property(t => t.ActionType)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.RecordCode)
                .IsFixedLength()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("HL7_Action");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.RecordID).HasColumnName("RecordID");
            this.Property(t => t.ActionDate).HasColumnName("ActionDate");
            this.Property(t => t.ActionType).HasColumnName("ActionType");
            this.Property(t => t.RecordCode).HasColumnName("RecordCode");
            this.Property(t => t.Proccessed).HasColumnName("Proccessed");
        }
    }
}
